package group2assignone.ucm.administrator;

import group2assignone.ucm.UCController;
import group2assignone.view.administrator.AddNewManagerView;
import group2assignone.view.administrator.AdminMainView;

/**
 * Use Case: Add Manager                                                   <br>
 * Pre-condition: User has clicked Add from the  Admin Main view.          <br>
 * Post-condition: Add Manager view is run                                 <br>
 * 1. system closes the Admin Main view                                     <br>
 * 2. system runs the add manager view                                     <br>

 * @author group2                                                           <br>
 */
public class UCUIAddManager implements UCController {

    private AdminMainView view;

    /**
     *This constructor recieves the main adminView as a paramater<br>
     * this is to enable data transfer between to interfaces and UC's
     * @param m_View
     */
    public UCUIAddManager(AdminMainView m_View) {
        view = m_View;
    }

    public void run() {
        //1. system closes the Admin Main view
        view.dispose();
        //2. system runs the add manager view
        AddNewManagerView mView = new AddNewManagerView();
        mView.go();
    }
}






